import { SET_PREFERENCES_WLPRESETS } from '../../constants/ActionTypes';
import cloneDeep from 'lodash.clonedeep';

const defaultState = [
  { id: '1', name: 'Soft tissue', window: '550', level: '40' },
  { id: '2', name: 'Lung', window: '150', level: '-600' },
  { id: '3', name: 'Liver', window: '150', level: '90' },
  { id: '4', name: 'Bone', window: '2500', level: '480' },
  { id: '5', name: 'Brain', window: '80', level: '40' },
  { id: '6', name: 'Trest', window: '1', level: '1' },
  { id: '7', name: '', window: '', level: '' },
  { id: '8', name: '', window: '', level: '' },
  { id: '9', name: '', window: '', level: '' },
  { id: '10', name: '', window: '', level: '' },
];

const wlPresets = (state = defaultState, action) => {
  switch (action.type) {
    case SET_PREFERENCES_WLPRESETS: {
      return cloneDeep(action.state);
    }
    default:
      return state;
  }
};

export { defaultState };

export default wlPresets;
